#{extends 'main.html' /}
<div id =main>

#{if userEntry==false}
</br>
You should join the organization to be able to view it's entities
<li><a href="@{Organizations.showOrganization(entityOrganization.id)}">Go to Organization</a>
			</li>

#{/if}

#{else}
<div id=right>


<a href="@{Organizations.viewAllEntities(entityOrganization.id)}" class=" button"><span class="plus icon"></span>Show All Entities</a>

<h2>Name: ${entity.entityName}</h2>

#{if entity.isLocked==false}
<h2>Status: Unlocked</h2>
#{/if} 

#{if entity.isLocked==true}
<h2>Status: Locked</h2>
#{/if} 

<code><u><b>Admin Panel:</b></u></code><br/><br/>
#{if isBlocked=true}
#{if authorized}

					<a id=status href="javascript: unlockEntity()"  class="button"><span class="lock icon"></span>Unlock</a>
#{/if}
					
	#{if isSubscriber==false}
					<a href="@{Entity.addSubscriber(entity.id)}"  class="button"><span class="rss icon"></span>Follow Entity</a><br /><br/>
					#{/if}
					
					#{if isSubscriber==true}
						<a href="@{Entity.removeSubscriber(entity.id)}"  class="button"><span class="rss icon"></span>Unfollow Entity</a><br /><br/>
					#{/if}
					
	
	<code><u><b>Topics and Ideas</b></u></code><br/><br/>			


<a href="@{Topics.listOfAllTopics(entity.id)}" class=" button"><span class="calendar icon"></span>List of all Topics</a>
#{if authorized}
<a href="@{Topics.listOfHiddenTopics(entity.id)}" class=" button"><span class="calendar icon"></span>List of all hidden Topics</a>
#{/if}
#{if authorized}
<a href="@{Topics.topicsWithNoIdeas(entity.id)}" class=" button"><span class="calendar icon"></span>List of all Topics with no ideas</a>
#{/if}
#{if authorized}
<a href="@{topics.topicPosting(entity.id)}" class=" button"><span class="plus icon"></span>Create Topic</a>
#{/if}
<a href="@{PostingIdea.showEntityIdeas(entity.id)}" class=" button"><span class="plus icon"></span>Show Entity Ideas</a>
#{if authorized}
<a href="@{PostingIdea.showHiddenIdeas()}" class=" button"><span class="calendar icon"></span>Show my Hidden Ideas</a>
#{/if}
<a href="@{PostingIdea.PostToEntity(entity.id)}" class=" button"><span class="plus icon"></span>Post Idea To Entity</a><br/><br/>
#{if authorized==false}
<a href="@{Requests.requestTopic(entity.id)}" class=" button"><span class="plus icon"></span>Request a Topic</a>
#{/if}
#{if authorized}
<a href="@{Requests.viewTopicRequest(entity.id)}" class=" button"><span class="plus icon"></span>View List Of Topic Requests</a><br/><br/>
#{/if}

#{if userType!="ideaDeveloper"|| isFound==true}
<a href="@{Invitations.showAllUsers(entity.id)}"  class=" button"><span class="mail icon"></span>Invite Others to be Organizers</a>
#{/if}

	
	   #{if userType!="ideaDeveloper"|| isFound==true}
		<a href="@{Entity.showIdeaDevelopersInOrg(entity.id)}"  class=" button"><span class="mail icon"></span>Assign Organizer</a>
			#{/if}
		#{if userType!="ideaDeveloper"|| isFound==true}
		<a href="@{Entity.showIdeaDevelopersInEntity(entity.id)}"  class=" button"><span class="mail icon"></span>Block an IdeaDeveloper</a>
	#{/if}

#{/if }

</div>
